package com.zxx.pattern.commandPattern.command1;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zxx on 2021/3/3
 */
public class TestCommand1 {

    public static void main(String[] args) {
        List<Command> commands = new ArrayList<>();
        commands.add(new ButtonCommand());
        commands.add(new ImageCommand());
        commands.add(new HttpCommand());

        for (Command command : commands) {
            command.execute();
        }
    }

}
